package Comparable接口比较大小;

public class Test {
    public static void main(String[] args) {
        Student student1 = new Student("zhangsan",10);
        Student student2 = new Student("lisi",15);
        System.out.println(student1.compareTo(student2));  //student1这个对象和student2这个对象比较的大小
        System.out.println(student1);
    }
}
